<?php

/*%setcsname%*/
// This should get replaced
/*END*/

include $name . '_fields.php';
GLOBAL $ProcSet;


$proc = $ProcSet[$name];

$Filtering = new CF_FilterDataPdo($proc->filters); 

	global $dbh;
/*%basequery%*/
	//$qry_list = "SELECT * FROM employees WHERE 1  " ;
/*END*/

	$qry_list .=  $Filtering->make_query_PSfilter();	


/*%heading%*/
	//$qry_list .= $Heading->make_query_sort();	
	//$qry_list = limit_query($qry_list, Paging->startat, Paging->numrows );
	//$qry_list = limit_query($qry_list, 2, 5 );
/*END*/	
	
	global $dbh;
	$stmt = $dbh->prepare($qry_list);	

	$Filtering->make_PSfilter_bindings($stmt);
	
	$list = get_array_stmt($stmt);
	
/*%tableclass%*/	
	//class Employees_table extends CF_TableEdPage {
/*END*/
	
// Add extra functions here
//	function make_lastName($input){
//		return '<b>BOLD: ' . $this->currentrow['firstName'] . ' ' . $input . '</b>';
//	}

	
	
}
/*%tablesetup%*/
//$employee_table = new Employees_table($fieldspec,$none,'employees');
//$employee_table->set_valuesarray($list);	
/*END*/	
//echo 'TABLE' . $employee_table->name;

?>
<div id='<?php print $name ?>_table_dv' >
	<table>
	<tbody>
	<?php
/*%tableprint%*/	
	//print $employee_table->maketable();
/*END*/	
	?>
	</tbody>
	</table>
</div>

